<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="author" content="顾林岭">
    <title>Dom操作</title>
</head>

<body>

</body>

</html>
<script>
    var html = document.querySelector('html');
    html.style.height = '100%';

    var body = document.querySelector('body');
    body.style.margin = '0';
    body.style.width = '100%';
    body.style.height = '100%';
    body.style.display = 'table-cell';
    body.style.overflow = 'hidden';
    body.style.backgroundColor = "#000";

    var container = document.createElement('div');
    container.style.width = '100%';
    container.style.height = '100%';
    container.style.display = 'table-cell';
    container.style.verticalAlign = 'middle';
    body.appendChild(container);

    var div = document.createElement('div');
    div.style.width = '987px';
    div.style.margin = 'auto';
    div.style.position = 'relative';
    div.style.padding = '0 0 25px 685px';
    div.style.backgroundColor = '#fff';

    container.appendChild(div);


    var a = [];
    var img = [];

    for (var i = 1; i <= 7; i++) {
        img[i] = document.createElement('img');
        img[i].setAttribute('src', 'img/img_0' + i + '.jpg');
        img[i].style.margin = '25px 25px 0 0';
        a[i] = document.createElement('a');
        a[i].setAttribute('href', '##');
        a[i].appendChild(img[i]);
        div.appendChild(a[i]);
    }
    img[1].style.position = 'absolute';
    img[1].style.left = '25px';
</script>